package com.example.server.controller;

import com.example.server.dao.SongMapper;
import com.example.server.domain.Songs;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/songs")
public class SongsController {

    @Autowired
    private SongMapper songMapper;

    @RequestMapping("findAllSongs")
    public Result findAllSongs(){
        List<Songs> A=songMapper.findAllSongs();
        return new Result(Code.SUCCESS,"查找成功",A);
    }
}
